package com.tangyuan.live.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
public enum LiveRoleEnum {

    ANCHOR(1,"主播"),
    AUDIENCE(2,"观众"),
            ;

    public final Integer role;
    public final String roleStr;

    public static LiveRoleEnum getEnum(Integer status){
        for (LiveRoleEnum value : LiveRoleEnum.values()) {
            if(value.role.equals(status)){
                return value;
            }
        }
        return AUDIENCE;
    }
}
